package com.gba.mark.exam.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gba.mark.exam.entity.ExamPaper;
import com.gba.mark.exam.entity.ExamQuestions;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ExamPaperMapper extends BaseMapper <ExamPaper>{


/*
查询试卷题目
 */


    @Select(
            "SELECT eq.questions FROM `exam_questions` eq,\n" +
                    "exam_paper e WHERE e.group_id = #{group_id}\n" +
                    " AND question_ids = eq.id")


    @Results({

            @Result(property = "id",column = "id"),
            @Result(property = "questions",column = "questions"),
            @Result(property = "answer",column = "answer"),

    })
    List<ExamPaper> findPaper(


            @Param("group_id") Integer group_id);
}
